package com.example.p131;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.util.Arrays;

@SpringBootApplication
public class P131Application {

	public static void main(String[] args) {
		ApplicationContext ctx = SpringApplication.run(P131Application.class, args);
		System.out.println("# Beans: " + ctx.getBeanDefinitionCount());
		String[] names = ctx.getBeanDefinitionNames();
		Arrays.sort(names);
		Arrays.asList(names).forEach(System.out::println);
	}


}
